/*
 *  Cero Project - Copyright   2006 The Cero Developement Team 
 *  (Michael Laguerre, Camille Roux, Matthieu Segret, Mathieu Sivade) 
 * 
 *  This program is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU General Public License as published by the Free 
 *  Software Foundation; either version 2 of the License, or (at your option) 
 *  any later version.
 * 
 *  This program is distributed in the hope that it will be useful, but 
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 *  for more details.
 */

package org.ceroproject;

import java.util.List;

//TODO : break this down, it's shit ! Make it into a class providing and setting an iterator. 

/**
 * Provides functions allowing to sort the implementing class.
 * 
 * @author Telem
 */
public interface Sortable<DataType> {
	/**
	 * Returns the sorter currently used to sort the data
	 * 
	 * @return the sorter currently used to sort the data
	 */
	Sorter<DataType> getSorter();

	/**
	 * Defines the sorter to use
	 * 
	 * @param sorter
	 *            the sorter to use
	 */
	void setSorter(Sorter<DataType> sorter);

	/**
	 * Sorts the data using the current sorter.
	 */
	void sort();
	
	/**
	 * Sorts the data using the Sorter 'sorter'
	 * @param sorter The sorter to use to sort the cards
	 */
	void sort(Sorter<DataType> sorter);

	/**
	 * Returns the list sorted through the current Sorter
	 * 
	 * @return the list sorted through the current Sorter
	 */
	List<DataType> getSortedList();
}
